Skip to content

[FLINK-39642][s3] Fix Illegal argument error message#28132

Open
Samrat002 wants to merge 1 commit intoapache:masterfrom
Samrat002:FLINK-39642
Open

[FLINK-39642][s3] Fix Illegal argument error message#28132
Samrat002 wants to merge 1 commit intoapache:masterfrom
Samrat002:FLINK-39642

Conversation

@Samrat002
Copy link
Copy Markdown
Contributor

What is the purpose of the change

Preconditions.checkArgument in Flink uses a simplified formatter that only supports %s placeholders (not %d, %f, etc.). Three validation error messages in
NativeS3FileSystemFactory used %d for numeric values, causing the format specifier to appear literally in the output while the actual value was appended in brackets —
e.g.:

s3.upload.min.part.size must be at least 5MB (5242880 bytes), but was %d bytes [1048576]
s3.upload.max.concurrent.uploads must be positive, but was %d [0]

This fix replaces %d with %s so values are substituted correctly.

Brief change log

  • Replace %d with %s in three Preconditions.checkArgument format strings in NativeS3FileSystemFactory (part size min, part size max, max concurrent uploads)

Verifying this change

This change is already covered by existing tests:

  • NativeS3FileSystemFactoryTest#testPartSizeTooSmallThrowsException
  • NativeS3FileSystemFactoryTest#testPartSizeTooLargeThrowsException
  • NativeS3FileSystemFactoryTest#testInvalidMaxConcurrentUploadsThrowsException

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: no
  • The S3 file system connector: yes

Documentation

  • Does this pull request introduce a new feature? no

Was generative AI tooling used to co-author this PR?
  • Yes

@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented May 9, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Copy link
Copy Markdown
Contributor

@spuru9 spuru9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, CI failure looks unrelated.

@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants